<template>
  <div class="iframe">
    <div class="i-title">
      <h3>setup 函数包含钩子函数</h3>
    </div>
    <div class="i-tip">
      {{ tip }}
    </div>
  </div>
</template>

<script setup>
import { onMounted, onBeforeMount } from "vue";
console.log("setup");
let tip = "setup > onBeforeMount > onMounted";
onMounted(() => {
  console.log("onMounted");
});
onBeforeMount(() => {
  console.log("beforeMount");
});
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
